import { _decorator, Component, Node } from 'cc'
import { Game } from './Game/Game'
import { ResMgr } from './Managers/ResMgr'
import { UIMgr } from './Managers/UIMgr'
const { ccclass, property } = _decorator

@ccclass('GameLaunch')
export class GameLaunch extends Component {
  onLoad() {
    console.log('[GameLaunch] onLoad')
    // 初始化游戏资源加载管理器
    this.node.addComponent(ResMgr)
    // 初始化游戏UI管理器
    this.node.addComponent(UIMgr)
    // 初始化游戏逻辑代码
    this.node.addComponent(Game)
  }

  start() {
    Game.Instance.GameStart()
  }
}
